<%@page import="com.tk.entity.Hero"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>生杀大权</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="css/manage.css" />
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="js/getBodyWidAndHei.js"></script>
<script type="text/javascript" src="js/time.js"></script>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

</head>

<body onload="getNowFormatDate()">
	<%
		Hero hero = (Hero) request.getSession().getAttribute("hero");
		if (hero == null) request.getRequestDispatcher("index.jsp");
	%>

	<!--头部部分-->
	<div class="title">
		<div class="date">
			<p></p>
		</div>
	</div>

	<!--左侧栏-->
	<div class="information">
		<ul>
			<li id="liFirst">
				<div class="headImg">
					<img src="img/home/普通用户.jpg" />
				</div>
				<div id="myName">
					<p>
						<%
							out.print(hero.getHname());
						%>
					</p>
					<br>
					<p>
						<%
							out.print(hero.getPos());
						%>
					</p>
					<br>
					<p>
						<%
							out.print(hero.getTeam());
						%>
					</p>
					<br>
				</div>
			</li>
			<li><a href="servlet/PaginationTheme" >天下形势</a></li>
			<li class="dropdown"><a href="servlet/findheroServlet?tog=repos">日理万机</a>
				<div class="dropdown-content">
					<ul>
						<li><a href="servlet/findheroServlet?tog=repos">任用罢免</a></li>
						<li><a href="servlet/findheroServlet?tog=kill">生杀大权</a></li>
						<li><a>奖率三军</a></li>
						<li><a>调兵遣将</a></li>
					</ul>
				</div></li>
			<li><a>知心交友</a></li>
			<li><a href="home/resume.jsp">英雄履历</a></li>
		</ul>
	</div>
	<div class="otherInfor">
		<div class="headText">
			<p>请选择对象:</p>
		</div>
		<!--表格-->
		<div class="newTable">
			<table id="title">
				<tr>
					<td>阵营</td>
					<td>用户名</td>
					<td>姓名</td>
					<td>字号</td>
					<td>籍贯</td>
					<td>职务</td>
					<td>状态</td>
					<td>流放</td>
				</tr>
				<c:if test="${empty heroList}">
					<tr>
						<td colspan="8">别想了，江湖的最底层的小卒子</td>
					</tr>
				</c:if>
				<c:forEach items="${heroList}" var="thero">
					<tr>
						<td>${thero.team}</td>
						<td>${thero.hid}</td>
						<td>${thero.hname}</td>
						<td>${thero.alias}</td>
						<td>${thero.add}</td>
						<td>${thero.pos}</td>
						<td>${thero.status}</td>
						<td>
							<form action="servlet/killServlet" method="post">
								<input type="hidden" value="${thero.hid}" name="hid"> <input
									type="hidden" value="${thero.team}" name="team"> <input
									type="submit" value="流放">
							</form>
						</td>
					</tr>
				</c:forEach>
			</table>
</body>
</html>
